#include <stdio.h>
#include <stdlib.h>
#include <math.h>


int p,i,j,n,F;
float R,S;
int main()
{
  
  
     printf("Entrez n :\n");
     scanf("%d",&n);
  
  
       printf("Entrez p  :\n");
       scanf("%d",&p);
 
       S=0;
       F=1;
        for (j=n;j>=1;j--)
        {
        for (i=1;i<=n;i++)
            {
              
              
                                 
                F=(F*j);
                R=((pow (p,i))/F);
                }
                   S=S+R; 
                   R=1;
                   F=1;
                   }
                    printf("R est :%3.2f\n\n",R);
                    printf("la somme de R est :%3.2f\n\n",S);
     
     
    
  
  system("PAUSE");	
  return 0;
}


GWH28-DGCMP-P6RC4-6J4MT-3HFDY